home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / csim / source.lha / source / C++SIM / Link.h < prev    next >
C/C++ Source or Header  |  1993-06-14  |  782b  |  61 lines

  1. /*
  2.  * Copyright (C) 1993
  3.  *
  4.  * Department of Computing Science,
  5.  * The University,
  6.  * Newcastle upon Tyne,
  7.  * UK.
  8.  */
  9.  
  10.  
  11. /*
  12.  * This class defines the elements of the linked lists within SIMSET.
  13.  */
  14.  
  15.  
  16. #ifndef LINK_H_
  17. #define LINK_H_
  18.  
  19. #ifndef COMMON_H_
  20. #include "common.h"
  21. #endif
  22.  
  23.  
  24. class Head;
  25.  
  26.  
  27. class Link
  28. {
  29. public:
  30.     virtual ~Link ();
  31.     
  32.     Link* Suc () const;
  33.     Link* Pred () const;
  34.  
  35.     Link* Out ();
  36.     void InTo (Head*);
  37.  
  38.     void Precede (Link*);
  39.     void Precede (Head*);
  40.     void Follow (Link*);
  41.     void Follow (Head*);
  42.  
  43.     boolean inList;
  44.     
  45. protected:
  46.     Link ();           // can only derive from this class
  47.  
  48. private:
  49.     void RemoveElement ();
  50.  
  51.     void addAfter (Link*);
  52.     void addBefore (Link*);
  53.     
  54.     Link *prev, *next;
  55. };
  56.  
  57.  
  58. #include "Link.n"
  59.  
  60. #endif
  61.